package com.roy.wakeupes.utils;


import com.aspose.words.Document;
import org.apache.commons.lang3.StringUtils;

import java.io.File;
import java.io.FileOutputStream;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.stream.Collectors;

public class PdfUtil {

    public static void wordToPdf(String wordPath, String pdfPath) throws Exception {
        pdfPath = FileUtil.getNewFileFullPath(wordPath, pdfPath, "pdf");
        File file = new File(pdfPath);
        FileOutputStream os = new FileOutputStream(file);
        Document doc = new Document(wordPath);
        doc.save(os, com.aspose.words.SaveFormat.PDF);
    }

    public static void main(String[] args) throws Exception {
        wordToPdf("/Users/xurui/Desktop/封狼居胥/第1天.docx", "/Users/xurui/Desktop");
        String s = "ss";
        List<String> list = Arrays.asList("","","");
        list.stream().map(x->{
            return x.toLowerCase(Locale.ROOT);
        }).collect(Collectors.toList());

    }


}
